import Scene from './scene'
import BackGround from '../runtime/background'

export default class LoadingScene extends Scene {
  constructor(aParent, aOpenID) {
    super(aParent)
    this.bg = new BackGround.loading()
  }
  enter(){
    Scene.prototype.enter.apply(this, arguments)
    setTimeout(e=>{this.toNextScene("train")},1000)
  }
  update(){
    return Scene.prototype.update.apply(this, arguments)
    // this.bg.update(ctx)
  }
  render(ctx){
    Scene.prototype.render.apply(this, arguments)
    this.bg.render(ctx)
  }
}